package com.ai.imagetext.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import lombok.Data;

import java.util.List;

@Data
@Configuration
@ConfigurationProperties(prefix = "file.upload")
public class FileUploadConfig {
    
    /**
     * 文件上传路径
     */
    private String path = "./uploads/";
    
    /**
     * 文件访问URL前缀
     */
    private String urlPrefix = "/uploads/";
    
    /**
     * 最大文件大小（字节）
     */
    private Long maxFileSize = 10485760L; // 10MB
    
    /**
     * 允许的文件类型
     */
    private List<String> allowedTypes = List.of(
        "image/jpeg",
        "image/jpg", 
        "image/png",
        "image/gif",
        "image/webp"
    );
    
    /**
     * 允许的文件扩展名
     */
    private List<String> allowedExtensions = List.of(
        ".jpg", ".jpeg", ".png", ".gif", ".webp"
    );
    
    /**
     * 缩略图尺寸
     */
    private Integer thumbnailSize = 300;
    
    /**
     * 是否生成缩略图
     */
    private Boolean generateThumbnail = true;
}